<?php

namespace App\Http\Controllers\Site\Custom;
use App\B2BProject\Site\HelperControllerBuildTrait;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;

class HomeController extends Controller
{
    use HelperControllerBuildTrait;
    public function getIndex()
    {
        return redirect()->route('account.home');
    }

    public function getHome()
    {
        $user = \Auth::user();

        $class = $user->class == 1 ? 'provider' : 'purchaser';

        return view("host/custom/$class/home");
    }
}
